package models

import "github.com/google/uuid"

type UserModel struct {
	BaseModel
	UUID     uuid.UUID `json:"uuid" gorm:"comment:用户UUID"`
	Username string    `json:"username" gorm:"comment:用户名"`
	OpenId   string    `json:"open_id" gorm:"comment:openID"`
	Password string    `json:"password" gorm:"comment:密码"`
	Nickname string    `json:"nickname" gorm:"comment:姓名"`
	Avatar   string    `json:"avatar" gorm:"comment:头像"`
	Gender   int       `json:"gender" gorm:"comment:性别,0未知,1男,2女"`
	Mobile   string    `json:"mobile" gorm:"comment:手机"`
	Status   int8      `json:"status" gorm:"default:0;comment:状态 0 未绑定手机号,1 未绑定用户信息,2已完成绑定,4锁定"`
}

func (UserModel) TableName() string {
	return "users"
}
